#!/bin/sh
#环境
#启动srv1：sh start.sh
#启动srv2：sh start.sh 2
active=srv1
if [ $1 ]; then
  active=srv${1}
fi
app=demoncat-eureka-server-2.0.0.jar
#启动
echo "Starting SpringBoot Application"
nohup java -Xms500m -Xmx500m -Xmn128m -Xss1024k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=1024m -XX:+HeapDumpOnOutOfMemoryError  -XX:HeapDumpPath=oom.hprof -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -Xloggc:gc.log -jar ${app} --spring.profiles.active=${active} > catalina.out 2>&1 &
# 查看日志：将导致构建阻塞，然后超时中断(UNSTABLE)
tail -f catalina.out
